﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Input;

namespace MathTools {
    public struct Matrix {
        Vector[] fVectors;
        public int pCount { get; private set; }
        public Matrix(Vector[] data) :this(){
            if (data != null) {
                this.fVectors= data;
                this.pCount = data.Length;
            } else {
                this.fVectors = null;
                this.pCount = 0;
            }
        }
        public Vector this[int i] {
            get { if (i >= 0 && i < this.pCount)return this.fVectors[i]; throw new IndexOutOfRangeException("索引超出范围"); }
            set { if (i >= 0 && i < this.pCount) this.fVectors[i] = value; throw new IndexOutOfRangeException("索引超出范围"); }
        }
    }
}
